﻿@model mtm.Articles.Models.ArticleIndexModel
@{ 
    /* Copyright © 2009 - 2010 Oleg Stuhin & Rostislav Haitovich 
       To learn more about mytrip.mvc visit  
       http://mytripmvc.net  http://mytripmvc.codeplex.com 
       mytripmvc@gmail.com
       license: Microsoft Public License (Ms-PL) */ 
}
@{
    ViewBag.Title = Html.MytripPageTitle(Model.PageTitle, "/");
    ViewBag.Keywords=Html.MytripPageTitle(Model.PageTitle, ",");
    ViewBag.Description=Html.MytripPageTitle(Model.PageTitle, ",");
}
@section scriptlink{
@Html.ScriptLink("MicrosoftAjax.js,MicrosoftMvcAjax.js,jquery.validate.min.js,jquery.validate.unobtrusive.min.js,Page/Articles.js")
}
@section contentSmall{
@Html.Partial("_sideBar") 
}
@section contentBig{
<table class="noborders"><tr><td>
<div class="right">
@Html.EditorCategory(Model.ShowAddCategory,Model.ShowAddSubCategory,Model.ShowAddArticle,Model.ShowAddBlog, Model.ShowAddPost, Model.CategoryId)
</div>
@Html.ParrentCategory(Model.ParentCategory,Model.Path)
<h3 class="title">
@Html.EditDeleteCategory(Model.ShowEditDelete,Model.CategoryId,Model.Path)
@Model.PageTitle
@Html.ArticleRssLink(Model.PageTitle,Model.Path, Model.CategoryId, 14)
</h3></td></tr></table>
@Html.ShowDetailsBlog(Model.ShowDetailsBlog,Model.ParentCategory)
@if (Model.Articles == null){
@Html.MytripPager(Model.DefaultCount,Model.Total,"...")
}
<div class="last"></div> 
@Html.ListCategories(Model.Categories,Model.Path)
@if (Model.Articles == null){
@Html.MytripPager(Model.DefaultCount,Model.Total,"...")
}else{
<div class="last"></div> 
@Html.MytripPager(Model.DefaultCount,Model.Total,"...")
<div class="last"></div><div class="content"><div class="sort"> 
@Html.SortPager(Model.Path,Model.CategoryId)</div></div>
<div class="last"></div>
{
foreach (var article in Model.Articles){
<div class="content">  
<table class="content"><tr>
<td class="artspcific">
<div class="info">
@Html.ArticleSpecification(article, Model.Path)
</div></td>
<td class="artcontent">
<div class="right">
@Html.ArticleRating(article.ApprovedVotes,false,article.TotalVotes)
</div>
<h3 class="hometitle">
@Html.MytripActionLink(Url.Action("View", new { id = article.ArticleId, id2 = article.Path }), article.Title)
</h3>
@Html.MytripActionLink(Url.Action("View", new { id = article.ArticleId, id2 = article.Path }), Html.MytripImageForAbstract(article.ImageForAbstract,150).ToString())
@if (article.OnlyForRegisterUser){  
<div class="left">
@Html.MytripImage("/images/Keys.png","", "imgkeys")
</div>
}
@Html.Raw(article.Abstract)
<div class="artteg">
@Html.ShowArticleTags(article)
</div></td></tr></table></div>
<div class="last"></div> 
}
}
@Html.MytripPager(Model.DefaultCount,Model.Total,"...")
} 
<div id="deleteModal" class="window"> 
<div class="modalTC">@CoreLanguage.delete</div>
<div class="modalC">
<table class="leftmidle"><tr><td>
@Html.MytripImage("/images/warning.png","warning","i")
</td><td>
<h3 class="hometitle">@CoreLanguage.are_you_sure</h3>
</td></tr></table>  
<div class="button">
@Html.MytripButton(CoreLanguage.cancel, false, "cancel","right")
@Html.MytripButton(CoreLanguage.remove, true, "ok","right")      
</div>
</div> 
</div>

<div id="modalCategory" class="window"> 
<div class="modalTC">@Html.MytripImage("/images/edite.png","edit","img14")
@ArticleLanguage.edit</div>
<div class="modalC">
<table class="leftmidle"><tr><td>
</td><td>
@Html.LabelFor("catTitle", ArticleLanguage.name)
@Html.TextBox("catTitle")
<span class="field-validation-valid" id="titleError"></span>
@Html.Hidden("modalEditId")
@Html.HiddenFor(model => model.Path)
<div id="modalShowMenu">
@Html.CheckBox("modalSeparateBlock")
@Html.LabelFor("modalSeparateBlock", ArticleLanguage.add_to_menu)
</div><div id="modalShowLang">
@Html.CheckBox("modalAllCulture")
@Html.LabelFor("modalAllCulture", ArticleLanguage.display_all_lang)
</div></td></tr></table>  
<div class="button">
@Html.MytripButton(CoreLanguage.cancel, true, "cancel","right")
@Html.MytripButton("   Ok   ", false, "okEditCategory","right")   
</div>
</div> 
</div>     
}

